UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'a1rPbH/2pI8dEfi8On58oirx1eTKm3cw3HSavYENzQA='
WHERE
key_id = 'dfdfb018f40e8b6f69e8c0fc1a094257c6565de7ac45723744edb20474692087'
AND (
token = 'a1rPbH/2pI8dEfi8On58oirx1eTKm3cw3HSavYENzQA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)