UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GDiKnLahNWrOSRJQZMCxgRqs1HshR/nZlNsb6f34Kv8='
WHERE
key_id = '6ed84f882da5dd51510e6946b359441e03368dac5222ac3fd8087cea3edfea56'
AND (
token = 'GDiKnLahNWrOSRJQZMCxgRqs1HshR/nZlNsb6f34Kv8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)