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