UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/oyYzxfjPW3loH19VpYjPEYB/DbUq4qBwLu+GUlA/5Q='
WHERE
key_id = '21e933d4627ed4e5561b512869ecfac775742c0590214c40bd2ce67c4e6c0755'
AND (
token = '/oyYzxfjPW3loH19VpYjPEYB/DbUq4qBwLu+GUlA/5Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)