UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VKXRD8UEHVWVo1E+YirL6z30zBqUHastWQh9+XIDLBE='
WHERE
key_id = '719b8d43f306deed2a4cce26a86a1c82468fb9fa3999b7c2483896f0b11a4a9c'
AND (
token = 'VKXRD8UEHVWVo1E+YirL6z30zBqUHastWQh9+XIDLBE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)