UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cyifibeptopDVYSKZE9VAAam6XIdEmusQIRSW3Z/zfE='
WHERE
key_id = 'db507f3efbd1d2f7c446995f18f2183de7b4a5e18eaf34c5f52b334bd7182c2b'
AND (
token = 'cyifibeptopDVYSKZE9VAAam6XIdEmusQIRSW3Z/zfE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)