UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AhPvLWQbMPK0/5gc5LjjN3UEXPmthV+SxAcs4/9Ql/0='
WHERE
key_id = '70ad27f4c76301bda14215d816dcdd06c9b963470cbbed1f8eb7ad16e4bbe77b'
AND (
token = 'AhPvLWQbMPK0/5gc5LjjN3UEXPmthV+SxAcs4/9Ql/0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)