UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zn0+NZ2iZO9GRrB5J6folyYCBU6GUsDy/QiiIZRyom4='
WHERE
key_id = '72cadacc32a04ea372170596ad206a839ca5c491d34b6944a878aff3a6eaab9c'
AND (
token = 'zn0+NZ2iZO9GRrB5J6folyYCBU6GUsDy/QiiIZRyom4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)