UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/O70V8ti/E9wKju2UDLeErY+qvnwtpraeI0JCs2kJBQ='
WHERE
key_id = '18c302c30d6e301d191275e61485c02321e9df24e8a7e08787460cd538f37eef'
AND (
token = '/O70V8ti/E9wKju2UDLeErY+qvnwtpraeI0JCs2kJBQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)