UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/SIBQcMudA+xXDeu16m3AkrWFKneSUQJdESOUnDQ6mY='
WHERE
key_id = '235466c378626f376b55480d2b2c5f9b8c54d6372788f93d827c595f25a445cb'
AND (
token = '/SIBQcMudA+xXDeu16m3AkrWFKneSUQJdESOUnDQ6mY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)