UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fjXSqcCjaQmP9/NQ8Unsy4mRy0Y+oGh4kRKo7kpjWZs='
WHERE
key_id = 'c62fd76ae9189c980f738b684a06b41a6993cf22aee8b2544246d4e2595eab77'
AND (
token = 'fjXSqcCjaQmP9/NQ8Unsy4mRy0Y+oGh4kRKo7kpjWZs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)