UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6a7x1zPEs1DfMO0mnMg7i2vErjmILn/Fhsyif7MNFSg=' 
WHERE 
  key_id = '71e591f2d0587efd214598857c63604f9f413edc6ce24ae8e5c37aeb7b3b1afc' 
  AND (
    token = '6a7x1zPEs1DfMO0mnMg7i2vErjmILn/Fhsyif7MNFSg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034