UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'B2fnA8FDShPvcKfCsbJOLJLuv/hqE7xX5QuyfRuDPNA='
WHERE
key_id = '3bdbe4cbcbd1ae68d25915d56ba7ed5ca904aa9487644333b1783bd3455b6b44'
AND (
token = 'B2fnA8FDShPvcKfCsbJOLJLuv/hqE7xX5QuyfRuDPNA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)