UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/yASuzzKSozupaOFdzuCygkAIzlIygRfk69eCCO2b5E='
WHERE
key_id = '7cfa3fa40debf38026a2c2221fc93cd0e960d3b770af84dfd0ce1f4fefeb06ba'
AND (
token = '/yASuzzKSozupaOFdzuCygkAIzlIygRfk69eCCO2b5E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)