UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '75q2umnz0hHEx4Buop1Y/qZ3npW2hUnYbcD5GNT6Q3A='
WHERE
key_id = 'cb39b49d0c91c309b4cdf04437aba175b34e9cbcb12a0867d706baaccf90b878'
AND (
token = '75q2umnz0hHEx4Buop1Y/qZ3npW2hUnYbcD5GNT6Q3A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)