UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nmul1mcys/R/m+hkOur8stvyb2GV8Tjq0SElUs3PDUg=' 
WHERE 
  key_id = 'eaf4a6ad7cbbd183a0c7f359ebd96ed329aa2c42cb5c3bed677e22b4270dbab1' 
  AND (
    token = 'nmul1mcys/R/m+hkOur8stvyb2GV8Tjq0SElUs3PDUg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00061