UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AsrGvPOGKFP8I6ssqE3LIDTxZ82u6YKlPRtDXsfPrDY='
WHERE
key_id = '2cf450ddc6721d7d3639fc3976dd0f712dcc2d57748fcf8a26b5a375f11ee9ab'
AND (
token = 'AsrGvPOGKFP8I6ssqE3LIDTxZ82u6YKlPRtDXsfPrDY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)