UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RooXTZWon7AWnxq6T/rTaGB9uH2g/8T5r3DFrjydgF8=' 
WHERE 
  key_id = 'ce0f3d55970a56114b81e5e975115fb2bcbae7067a4b0c85e5ccb849913b4f88' 
  AND (
    token = 'RooXTZWon7AWnxq6T/rTaGB9uH2g/8T5r3DFrjydgF8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037