UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Vb85p4nfhpSS1K87DsxFiT90j9R+of5Utw3J+2E/DaQ='
WHERE
key_id = '32343d9aeebfd01c14dec9fd91e9cf9224e3ca9c4dff63fd4428de3130ad4bd6'
AND (
token = 'Vb85p4nfhpSS1K87DsxFiT90j9R+of5Utw3J+2E/DaQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)