UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'tElDCq2bR1amRi2xn+XGh0JV5w6NgDxOwC1K4Fv7LRY=' 
WHERE 
  key_id = '1de4e33dca354f0803d23f1c597c79148b685a52b9b9d5657819941fdf766943' 
  AND (
    token = 'tElDCq2bR1amRi2xn+XGh0JV5w6NgDxOwC1K4Fv7LRY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034