UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZJ+fwFgLkVaQ66L1UQF3rypIobvSkhcl7yXM2JrsAOY='
WHERE
key_id = '15de3aec5ebc2e03fa4c847370351fd0c145cba32ee20644f58145794bddc031'
AND (
token = 'ZJ+fwFgLkVaQ66L1UQF3rypIobvSkhcl7yXM2JrsAOY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)