UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/UxvMwC6QdZ7UYqNcgWAca9O4ffanaYvoCEGWQFNIWw='
WHERE
key_id = '39649c2db94a78ece4358eb0f982710394485d73bb34412b091d6b5abf2d739b'
AND (
token = '/UxvMwC6QdZ7UYqNcgWAca9O4ffanaYvoCEGWQFNIWw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)