UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kkCkeFfJuVxKWk5UtF64g9r/6X5v2l1IY7RpAYqZnG0='
WHERE
key_id = '2fa6a6f5577d8086ec7a262d2301dac4616683ae321ec5e15e126568b5e0769f'
AND (
token = 'kkCkeFfJuVxKWk5UtF64g9r/6X5v2l1IY7RpAYqZnG0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)