UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'WCCUZ+2K9/LBe0Z0VE05rFdfo+Um1QVXNJKSyJnTuoQ=' 
WHERE 
  key_id = 'ffc708185159c1505ddc85ecc26e1698eaa50cac823bf8e922d8a4c65571dbad' 
  AND (
    token = 'WCCUZ+2K9/LBe0Z0VE05rFdfo+Um1QVXNJKSyJnTuoQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042