UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lWJPTJn8VibepAYY1j87ghyBeX0DDoWsgImVCqowgvs='
WHERE
key_id = '92a104f6bf8026a79984deec093edd9d1dff90cd4f4b45767f6a1812dd772783'
AND (
token = 'lWJPTJn8VibepAYY1j87ghyBeX0DDoWsgImVCqowgvs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)