UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'p4vqMEF5Xkk3BCMfTisrr8xyJten2Rlu9MWWcWf0bwY=' 
WHERE 
  key_id = '35b0da138b53683ca0ca929576e1e2dfd74cdd0b3e4933f7938933f10c163de2' 
  AND (
    token = 'p4vqMEF5Xkk3BCMfTisrr8xyJten2Rlu9MWWcWf0bwY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023