UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FKK2BJSW2VVA7Q2YSjVTH2mvqkxlUSZtYC1KyxyZsaM='
WHERE
key_id = 'b3e76e1dd2fd73232b491495867bc43f5341b58d2e2ed945e5b8d9b207fc9a76'
AND (
token = 'FKK2BJSW2VVA7Q2YSjVTH2mvqkxlUSZtYC1KyxyZsaM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)