UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iHQnb8aE+f0QOh2a6MguhFUslFmOgplfjX8uClvQC1A='
WHERE
key_id = '29c68bec8f8a171a7bb2688efbeff158a38ceedf3ec86660ca2fcb28a4bf6753'
AND (
token = 'iHQnb8aE+f0QOh2a6MguhFUslFmOgplfjX8uClvQC1A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)