UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/WJ4ZVEn0pl+jjQRU4onkTUjEZt5a77Vrsi/SpEZPBQ=' 
WHERE 
  key_id = 'ee1905d7f4c0f2bb78ecce0a19b557c80d89c7b6fdcb5686cafb1cc178044770' 
  AND (
    token = '/WJ4ZVEn0pl+jjQRU4onkTUjEZt5a77Vrsi/SpEZPBQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037