UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kqArH69NaUOzlWDvP+WiMNEBPKrsqQUM/Mh+JfF0iDQ='
WHERE
key_id = '7e2fcc63818a0e903059fa7b5e29bd950a3ae06ac28be979a08f4c57b1e356ed'
AND (
token = 'kqArH69NaUOzlWDvP+WiMNEBPKrsqQUM/Mh+JfF0iDQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)