UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aT8Yp0HZI09gbLXxYWlaczk9wlZysFqfIkUy/0UeuxQ='
WHERE
key_id = '00088b5d7185328caa10791a2739d7e543785119aecd003c96c14843e6e2dc11'
AND (
token = 'aT8Yp0HZI09gbLXxYWlaczk9wlZysFqfIkUy/0UeuxQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)