UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'I0e/pPE8KCXRPJ2Vac5/jd7c1d/y4pi4m8q+Fnixo+U=' 
WHERE 
  key_id = 'abcbf0ac94ae2b69f41d3312a3012f6735f27ef76db67a015fc93b814d343646' 
  AND (
    token = 'I0e/pPE8KCXRPJ2Vac5/jd7c1d/y4pi4m8q+Fnixo+U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031