UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0p9dPIhqO1LZ6Tlch6etS+wzSWQQRCH8FpRoxbvKRKI='
WHERE
key_id = '82340eb0b7f69ac902e52ee17147e923654b1b0afd274b050ee263a3eccc195a'
AND (
token = '0p9dPIhqO1LZ6Tlch6etS+wzSWQQRCH8FpRoxbvKRKI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)