UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'W2xlalz/pTuM1HCzUpby36sTwG/QXBQUoVV/eX1ZAnQ='
WHERE
key_id = 'ad27f323f137084ab69e0ac1a57d758c8c4ed99babec33b6872006526d08b072'
AND (
token = 'W2xlalz/pTuM1HCzUpby36sTwG/QXBQUoVV/eX1ZAnQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)